package com.sixth.controller;

import com.sixth.annotation.OperationLogAdvice;
import com.sixth.bean.common.BaseRespVo;
import com.sixth.bean.vo.AdminDashboardVo;
import com.sixth.service.AdminDashboardService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName AdminDashboardController
 * @Description TODO
 * @Author XiaoWJ
 * @Date 2022/9/6 21:20
 **/

@RestController
public class AdminDashboardController {


    @Autowired
    AdminDashboardService adminDashboardService;


    //@RequiresPermissions(value = {"admin/dashboard,*"},logical = Logical.OR)
    //@OperationLogAdvice(operationType = 2,operation = "显示总数")
    @RequestMapping("admin/dashboard")
    public BaseRespVo<AdminDashboardVo> dashboard(){

        AdminDashboardVo adminDashboardVo = adminDashboardService.dashboard();

        return BaseRespVo.ok(adminDashboardVo);
    }

}
